//
//  LSYHTTPManager.m
//  LSYReader
//
//  Created by sam on 2018/3/23.
//  Copyright © 2018年 okwei. All rights reserved.
//

#import "LSYHTTPManager.h"

@implementation LSYHTTPManager

+ (instancetype)htmlManager {
    LSYHTTPManager *manager = [[LSYHTTPManager alloc] initWithBaseURL:nil];
    AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];
    securityPolicy.allowInvalidCertificates = YES;
    securityPolicy.validatesDomainName = NO;
    manager.securityPolicy = securityPolicy;
    
    [manager setResponseSerializer:[AFCompoundResponseSerializer serializer]];
    [[manager requestSerializer] setValue:@"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36" forHTTPHeaderField:@"User-Agent"];
    return manager;
}
+ (instancetype)jsonManager {
    LSYHTTPManager *manager = [LSYHTTPManager manager];
    return manager;
}
@end
